
/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"00E6A316-A6DE-4FD0-90E7-4E57730A4DF5"}
 */
function imprimir(event) 
{
	forms.despiece_tree_imp.imagen_tree = application.createJPGImage(elements.bean_103, 580, 335);
	forms.despiece_tree_imp.controller.showPrintPreview(true)
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B171CE16-60F9-4891-8FDA-A30D3C0F7C11"}
 */
function pdf(event) 
{
	// GENERAR PDF
	forms.despiece_tree_imp.imagen_tree = application.createJPGImage(elements.bean_103, 580, 500);
	var nombre_pdf = globals.zconf_path_pdf + '/despiece_'+ utils.dateFormat(new Date(),'dd-MM-yyyy HH-mm-ss')+'.pdf'
	forms.despiece_tree_imp.controller.print(true,false,plugins.pdf_output.getPDFPrinter(nombre_pdf))
	application.showURL('file:///'+ nombre_pdf)
}


/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"30EF926C-6622-4A85-83C0-535A500F9B50"}
 */
function volver(event) 
{
	var nombre = application.getWindow('Despiece Version')
	nombre.hide()
	nombre.destroy()
}
